package com.ghn.cocknovel.utils

import com.tencent.map.geolocation.TencentLocationUtils

object MapUtils {

//两个点以经纬度的形式计算距离

    fun distanceBetween(aLatitude: Double, aLongitude: Double, bLatitude: Double, bLongitude: Double): Double {
        return TencentLocationUtils.distanceBetween(aLatitude, aLongitude, bLatitude, bLongitude)
    }

    /**
     * 是否到终点
     */
    fun isGoToEnd(aLatitude: Double, aLongitude: Double, bLatitude: Double, bLongitude: Double): Boolean {
        return TencentLocationUtils.distanceBetween(aLatitude, aLongitude, bLatitude, bLongitude) < 100
    }

}